<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="vue.js"></script>
</head>

<body>
    <div id="app">
        <my-parent></my-parent>
    </div>
    <template id="father">
        <div>
            父组件
            <my-son></my-son>
        </div>
    </template>
    <template id="son">
        <div>
            子组件
        </div>
    </template>

    <script>
    const Son = {
        template: '#son'
    }
    const Parent = {
        template: '#father',
        components: {
            'mySon':Son
        }
    }

     var app = new Vue({
        el: '#app',
        components: {
            'myParent': Parent
        },
     });
    </script>
</body>

</html>